package com.zimmur.dao.designer;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.zimmur.model.desiger.DesigerInfo;
import com.zimmur.model.desiger.view.DesigerInfoVo;
import com.zimmur.model.desiger.view.DesigerVo;
import com.zimmur.solr.model.Designer;

public interface IDesigerInfoDao {
	public DesigerInfo selectByUserIdDesigerInfo(long userId);
	
	public List<DesigerInfo> selectByDesigerTag(@Param("tags")String tags,@Param("pageNow")int pageNow,@Param("pageSize")int pageSize);
	
	public Integer selectByDesigerTagCount(@Param("tags")String tags);
	
	public List<DesigerInfo> selectCountByLikeNickNameAndTags(@Param("key")String key,@Param("pageNow")int beginNo,@Param("pageSize")int pageSize);
	
	int selectCountByLikeNickNameAndTagsCount(@Param("key")String key);
	/**
	 * 查询所有的衣匠，根据首字母排序
	 * @param type 1 prefix 字段为字母，2 prefix 字段不是字母
	 * @return
	 */
	public List<DesigerVo> selectAll(@Param("type")Integer type);
	
	/**
	 * 通过关键字和当前用户 查询衣匠列表
	 * @param key  用户昵称/标签名
	 * @param first
	 * @param size
	 * @param createUserId
	 * @return
	 */
	public List<DesigerVo> selectDesiger(@Param("key")String key,@Param("tags")String tags,@Param("first")int first,@Param("size")int size,@Param("createUserId")Long createUserId);
	
	public int countDesiger(@Param("key")String key,@Param("tags")String tags);
	
	public DesigerInfoVo selectDesigerByUserId(@Param("userId")long userId,@Param("createUserId")long createUserId);
	
	public Designer selectDesigerByUserIdForSolr(Long userId);
	
	public List<Designer> selectDesigerByUserIdsForSolr(String userIds);
	
}
